package br.com.Word.View;

import br.com.Word.Logica.PiscarLabel;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import static java.awt.Frame.MAXIMIZED_BOTH;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;
import java.util.TimerTask;
import javax.swing.Action;
import javax.swing.JLabel;
import javax.swing.Timer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author alexandre
 */
public class JPInterface1 extends javax.swing.JPanel {

    /**
     * Creates new form NewJPanel2
     */
    public JPInterface1() {

        initComponents();
        jLCabeçario.setText("<html>Mais a esquerda tem o ABA Arquivo Através dessa ABA,"
                + " podemos criar novos documentos, abrir arquivos existentes, salvar documentos,"
                + " imprimir, preparar o documento (permite adicionar propriedades ao documento, "
                + "criptografar, adicionar assinaturas digitais, etc.)"
                + ". Vamos utilizar alguns destes recursos no andamento de nosso curso.</html>");

        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jL1 = new javax.swing.JLabel();
        jL2 = new javax.swing.JLabel();
        jL3 = new javax.swing.JLabel();
        jLAquivos = new javax.swing.JLabel();
        jLCabeçario = new javax.swing.JLabel();
        jLCXTexto = new javax.swing.JLabel();
        voltar = new javax.swing.JLabel();
        jLTelaWord = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 0));
        setMaximumSize(new java.awt.Dimension(543, 360));
        setMinimumSize(new java.awt.Dimension(543, 360));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jL1.setForeground(new java.awt.Color(255, 0, 0));
        jL1.setText("1");
        add(jL1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 530, 10, -1));

        jL2.setForeground(new java.awt.Color(255, 0, 0));
        jL2.setText("2");
        add(jL2, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 530, 10, -1));

        jL3.setForeground(new java.awt.Color(255, 0, 0));
        jL3.setText("3");
        add(jL3, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 530, 20, -1));

        jLAquivos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Arquivo.png"))); // NOI18N
        jLAquivos.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 0, 0)));
        add(jLAquivos, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 20, 110, 460));

        jLCabeçario.setFont(new java.awt.Font("Batang", 3, 12)); // NOI18N
        jLCabeçario.setForeground(new java.awt.Color(255, 51, 51));
        jLCabeçario.setText("JLTEXTO");
        add(jLCabeçario, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 420, 390, 110));

        jLCXTexto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Fundo.jpg"))); // NOI18N
        jLCXTexto.setText("jLabel1");
        jLCXTexto.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(255, 0, 0), new java.awt.Color(255, 0, 0)));
        add(jLCXTexto, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 410, 410, 140));

        voltar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/direction_left.png"))); // NOI18N
        add(voltar, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 500, -1, -1));

        jLTelaWord.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/Word/imagen/Tela 1024.png"))); // NOI18N
        add(jLTelaWord, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -80, -1, 760));
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JLabel jL1;
    public javax.swing.JLabel jL2;
    public javax.swing.JLabel jL3;
    public javax.swing.JLabel jLAquivos;
    public javax.swing.JLabel jLCXTexto;
    public javax.swing.JLabel jLCabeçario;
    public javax.swing.JLabel jLTelaWord;
    public javax.swing.JLabel voltar;
    // End of variables declaration//GEN-END:variables

    public void Piscar(final JLabel lb) {
        Timer t = new Timer(300, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
                if (lb.isVisible() == true) {
                    lb.setVisible(false);
                    lb.setBackground(Color.RED); //Muda a cor do fundo  
                    lb.setForeground(Color.RED); //Mudar a cor do texto
                } else {

                    lb.setVisible(true);

                }

            }

        });
        t.start();
    }
}
